<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
request.setCharacterEncoding("UTF-8");
String htmlData = request.getParameter("content1") != null ? request.getParameter("content1") : "";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="<%=basePath%>">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<link rel="stylesheet" type="text/css"	href="<%=basePath %>admin/assets/jquery-easyui-1.4.3/themes/bootstrap/easyui.css">
<link rel="stylesheet" type="text/css" href="<%=basePath %>admin/assets/jquery-easyui-1.4.3/themes/icon.css">
<script type="text/javascript" src="<%=basePath %>admin/assets/jquery-easyui-1.4.3/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath %>admin/assets/jquery-easyui-1.4.3/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=basePath %>admin/assets/jquery-easyui-1.4.3/locale/easyui-lang-zh_CN.js"></script>
<link rel="stylesheet" href="<%=basePath %>admin/assets/css/backOffice/myeasyui_base.css" type="text/css"></link>
	<link rel="stylesheet" type="text/css" href="<%=basePath%>admin/assets/css/backOffice/newsStyle.css">

<style type="text/css">

#tinybox{position:absolute; display:none; padding:10px; background:#ffffff url(image/preload.gif) no-repeat 50% 50%; border:10px solid #e3e3e3; z-index:2000;}
#tinymask{position:absolute; display:none; top:0; left:0; height:100%; width:100%; background:#000000; z-index:1500;}
#tinycontent{background:#ffffff; font-size:1.1em;}


</style>
<body>
    <div class="topTitle">
    	质量控制
    </div>
    
    <!-- Begin 质量控制面板 -->
 	<div id="main_layout" class="easyui-layout">
	    <div data-options="region:'center',title:'质量控制'" style="padding:5px;background:#eee;">
	    	<table class="easyui-datagrid"  id="qualityControl" 
				data-options="rownumbers:true,singleSelect:true,url:'admin/qualityControl/qualityControl_getQualityControlJson.action',method:'get',toolbar:'#btn_qualityControl',pageSize: '20',pageList: [20, 30, 40, 50, 100],pagination:true,fit:true" >
			
			<thead data-options="frozen:true">
				<tr>
					<th data-options="field:'qcId',width:100,align:'center'">编号</th>
					<th data-options="field:'projectName',fit:'true',align:'left'">项目名称</th>
					<th data-options="field:'sponsorCompName',fit:'true',align:'left'" formatter="showSponsorFormatter">发起实验室</th>
					<th data-options="field:'statusName',fit:'true',align:'left'" formatter="openFlagFormatter">进行状态</th>
				</tr>
			</thead>
			<thead>
				<tr>
					<th data-options="field:'fieldName',width:80,align:'center'">领域</th>
					<th data-options="field:'scopeName',width:80,align:'center'">参加范围</th>
					<th data-options="field:'natureName',width:80,align:'center'">活动性质</th>
					<th data-options="field:'countName',width:100,align:'center'" formatter="countAndJoinersFormatter">参加人数(已报)</th>
					<th data-options="field:'beginDate',width:100,align:'center'" formatter="dateFormatter">开始时间</th>
					<th data-options="field:'endDate',width:100,align:'center'" formatter="dateFormatter">结束时间</th>
					<th data-options="field:'feedBackDate',width:100,align:'center'" formatter="dateFormatter">反馈时间</th>
					<th data-options="field:'price',fit:'true',align:'right'" formatter="priceFormatter">价格</th>
					<th data-options="field:'imgs',width:100,align:'center'" formatter="imgsFormatter">图片</th>
					<th data-options="field:'ptclsj',width:80,align:'center'" formatter="ptclsjStatusFormatter">平台处理</th>
					<th data-options="field:'gbjgxx',width:80,align:'center'" formatter="gbjgxxStatusFormatter">公布机构信息</th>
					<th data-options="field:'ptxz',width:80,align:'center'" formatter="ptxzStatusFormatter">平台协助</th>
					<th data-options="field:'file',width:80,align:'center'" formatter="pdfFileFormatter">质量报告</th>
					<th data-options="field:'description',fit:'true',align:'left'" formatter="longStringFormatter">描述</th>
					<th data-options="field:'other',fit:'true',align:'left'" formatter="longStringFormatter">其他</th>
					<th data-options="field:'addTime',width:150,align:'center'"formatter="dateHHmmssFormatter">创建时间</th>
				</tr>
			</thead>
		</table>
		
    </div>
</div>
	<!-- End 质量控制面板 -->
    
     <!-- Begin 菜单详情操作按钮 -->
    <div id="btn_qualityControl" style="height:auto">
    	<div style="margin-bottom:5px">
		<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="modifyQualityControl()">修改</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-pause_green',plain:true" onclick="closeQualityControl()">关闭</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-play_green',plain:true" onclick="openQualityControl()">开启</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-page_white_acrobat',plain:true" onclick="updatePDF()">上传报告</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="removeQc()">删除</a>
		</div>
		<div>
			<table style="font-size: 13">
				<tr>
					<td style="text-align: right;">
						编号： 
					</td>
					<td>
						<input  class="easyui-textbox" type="text" id="search_qcId"  data-options="" style="width:150px"></input>
					</td>
					<td class="align_right_100">
						项目名称： 
					</td>
					<td>
						<input  class="easyui-textbox" type="text" id="search_projectName"  data-options="validType:'length[1,20]'" style="width:150px"></input>
					</td>
					<td class="align_right_100">
						发起实验室：
					</td>
					<td> 
						<input  class="easyui-textbox" type="text" id="search_sponsor"  data-options="" style="width:150px"></input>
					</td>
					<td class="align_right_100">
						进行状态：
					</td>
					<td>
						<input id="search_status" class="easyui-combobox" data-options="valueField:'key',textField:'value',url:'admin/system_dictionaryJson.action?comBoBox.name=qc_status&comBoBox.isSelect=true',panelHeight:'auto'" /> 
					</td>
				</tr>
				<tr>
					<td style="text-align: right;">
						关闭状态： 
					</td>
					<td>
						<select class="easyui-combobox"   id="search_openFlag"  panelHeight="auto" style="width:150px" >
							<option value="">==请选择==</option>
							<option value="1">未关闭</option>
							<option value="0">已关闭</option>
						</select>
					</td>
					<td class="align_right_100">
						平台处理： 
					</td>
					<td>
						<select class="easyui-combobox"   id="search_ptclsj"  panelHeight="auto" style="width:150px" >
							<option value="">==请选择==</option>
							<option value="1">是</option>
							<option value="0">否</option>
						</select>
					</td>
					<td class="align_right_100">
						平台协助：
					</td>
					<td>
						<select class="easyui-combobox"   id="search_ptxz"  panelHeight="auto" style="width:150px" >
							<option value="">==请选择==</option>
							<option value="1">是</option>
							<option value="0">否</option>
						</select>
					</td>
					<td class="align_right_100">
						<a class="easyui-linkbutton" iconCls="icon-search" onclick="searchQualityControl()">查询</a>
					</td>
				</tr>
			</table>
			<br>
		</div>
	</div>
    <!-- End 菜单详情操作按钮 -->
    
    <!-- Begin 实验室详情 -->
	<div id="sponsor_dialog" class="easyui-dialog"  style="padding:10px" data-options="modal:true,closed:true,resizable:true,shadow:false">
	    	<table style="width: 350px" align="center">
	    		<tr>
	    			<td align="right">编&nbsp; &nbsp; &nbsp;号：</td>
	    			<td id = "accountId"  style="width: 230px"></td>
	    		</tr>
	    		<tr>
	    			<td align="right">实 验 室：</td>
	    			<td id = "compName"  style="width: 230px"></td>
	    		</tr>
	    		<tr>
	    			<td align="right">联 系 人：</td>
	    			<td  id = "compNature"></td>
	    		</tr>
	    		<tr>
	    			<td align="right">电&nbsp; &nbsp; &nbsp;话：</td>
	    			<td  id = "phone"></td>
	    		</tr>
	    		<tr>
	    			<td align="right">传&nbsp; &nbsp; &nbsp;真：</td>
	    			<td   id = "fax"></td>
	    		</tr>
	    		<tr>
	    			<td align="right">邮&nbsp; &nbsp; &nbsp;箱：</td>
	    			<td   id = "email"></td>
	    		</tr>
	    	</table>
	    <div style="text-align:center;padding:5px">
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="dialog_close()">关闭</a>
	    </div>
	</div>
	<!-- End 实验室详情 -->
    
     <!-- Begin 参加人数详情 -->
	<div id="joiners_dialog" class="easyui-dialog"  style="padding:10px;height: 400px;width: 1024px" data-options="modal:true,closed:true,resizable:true,shadow:false">
	    <table class="easyui-datagrid"  id="qualityControlJoiners" >
			
		</table>
<!-- 	    <div style="text-align:center;padding:5px">
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="joiners_close()">关闭</a>
	    </div>
 -->	</div>
	<!-- End 参加人数详情 -->
    
     <!-- Begin 关闭 -->
	<div id="statusClose_dialog" class="easyui-dialog"  style="padding:10px" data-options="modal:true,closed:true,resizable:true,shadow:false">
	    	<form id="statusClose_form" method="post">
	    		<input type="hidden" id="form_qcId_Hidden" name="qualityControl.qcId" />
	    		<input type="hidden" id="form_openFlag_Hidden" name="qualityControl.openFlag" value="0" />
		    	<table style="width: 350px" align="center">
		    		<tr>
		    			<td>
		    				<textarea id="form_closeReason_Hidden"  name="qualityControl.closeReason"  rows="4" cols="45"></textarea>
		    			</td>
		    		</tr>
		    	</table>
	    	</form>
	    <div style="text-align:center;padding:5px">
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitDataForm()">提交</a>
	    </div>
	</div>
	<!-- End 关闭 -->
	
	<!-- Begin 上传 PDF-->
	<div id="updatePDF_dialog" class="easyui-dialog"  style="padding:10px" data-options="modal:true,closed:true,resizable:true,shadow:false">
	    	<form id="updatePDF_form" method="post" enctype="multipart/form-data">
	    		<input type="hidden" id="pdfForm_qcId_Hidden" name="qualityControl.qcId" />
		    	<table style="width: 350px" align="center">
		    		<tr>
		    			<td>
		    				<td  class="fileInput"><input type="file" name="pdfFile" id="form_file"/></td>
		    			</td>
		    		</tr>
		    	</table>
	    	</form>
	    <div style="text-align:center;padding:5px">
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitPDFForm()">提交</a>
	    </div>
	</div>
	<!-- End 上传 PDF-->
    
	<script type="text/javascript" src="<%=basePath %>admin/assets/js/BackOffice/mine-function.js"></script>
	<script type="text/javascript" src="<%=basePath %>admin/youbiao/news/js/tinybox.js"></script>
	<script type="text/javascript" src="<%=basePath %>admin/youbiao/qualityControl/js/js_qualityControl.js"></script>
	<script type="text/javascript">
		function tanchupic(src){
			var content = "<img width='auto' height='500' src='"+src+"' />";//弹出图片
		    TINY.box.show(content,0,0,0,0);
		   }
	</script>
</body>
</html>
